new function (){
   var _self = this;
   _self.width = 640;//设置默认最大宽度
   _self.fontSize = 100;//默认字体大小
   _self.widthProportion = function(){var p = (document.body&&document.body.clientWidth||document.getElementsByTagName("html")[0].offsetWidth)/_self.width;return p>1?1:p<0.5?0.5:p;};
   _self.changePage = function(){
       document.getElementsByTagName("html")[0].setAttribute("style","font-size:"+_self.widthProportion()*_self.fontSize+"px");
   }
   _self.changePage();
   window.addEventListener('resize',function(){_self.changePage();},false);
};


function getScrollTop()
{
    var scrollTop=0;
    if(document.documentElement&&document.documentElement.scrollTop)
    {
        scrollTop=document.documentElement.scrollTop;
    }
    else if(document.body)
    {
        scrollTop=document.body.scrollTop;
    }
    return scrollTop;
}
/*$(window).on("load",function() {
	$("#status").fadeOut();
	$("#preloader").delay(150).fadeOut("slow");
})*/

$(".home_cp_tit a").click(function(){
			    $('.home_cp_tit a').removeClass('change_c')
                $(this).addClass("change_c");
                var value=$(this).attr("data-value");
                show(value);
                console.log(value);
});
$(".yy_jl_tit a").click(function(){
    /*$('.yy_jl_tit a').removeClass('change_c')
    $(this).addClass("change_c");
    var index = $(".yy_jl_tit a").index($(this));
    $(".yy_jl_box").css("display","none");
    $(".yy_jl_box").eq(index).css("display","block");*/
    var value=$(this).attr("data-value");
    var memberId = $("#memberId").val();
    var url = "/phone/myWinning?memberId=" + memberId + "&status=" + value;
    window.location.href = url;
});

function setCookie(c_name,value,expiredays) {
    var exdate=new Date();
    exdate.setDate(exdate.getDate()+expiredays);
    document.cookie=c_name+ "=" +escape(value)+
        ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

//取回cookie
function getCookie(c_name) {
    if (document.cookie.length>0) {
        c_start=document.cookie.indexOf(c_name + "=")
        if (c_start!=-1) {
            c_start=c_start + c_name.length+1
            c_end=document.cookie.indexOf(";",c_start)
            if (c_end==-1) c_end=document.cookie.length
            return unescape(document.cookie.substring(c_start,c_end))
        }
    }
    return ""
}

